: The relationship here is or, that is, you configure logging. file or logging. path, and the effect is the same.
The following table shows how to output the configuration file:
Logging. file
Logging. path
Example
Description
Spring Boot logging SLF4J
To print the content during development, use System. out. println () and Log4j should be the human Bypass Method.In fact, we do not recommend using System. out during development because a large amount of System. out will increase resource consumption.Log4j is more flexible and has higher performance than System. out. We can configure th
Spring-boot default uses Logback to record Logger,spring-boot package inside the org.springframework.boot.logging.logback path there are some configuration files, which are used by default base.xml , which output logs to the console and files. Its content is:For output to a file, if you set Logging.file to use this val
The build project encountered an error because the company configured the check rule in Super-bom:[ERROR] [XXX Enforcer Rules] Find duplicateclassesFound in:Org.apache.logging.log4j:log4j-slf4j-impl:jar:2.6.2:compileCh.qos.logback:logback-classic:jar:1.1.7:compileDuplicate classes:Org/slf4j/impl/staticmdcbinder.classOrg/slf4j/impl/staticmarkerbinder.classOrg/slf4j/impl/staticloggerbinder.classI did not directly quote Logback-classic in the POM, see this error is ignorant, I did not quote this in
I. OverviewSpring Boot Actuator is a child project of spring boot. With it, you can add some production-level services to your app without requiring special configuration. This tutorial shows the use of Eclipse + maven to build a restful app from scratch.The effect of this application is to access http://localhost:8080/fuck?name=xxx, return a JSON string, and acc
Maven Project Build spring boot + spring mvc + JPA example, mavenmvc
This article describes how to build spring boot + spring mvc + JPA by using Maven:
Add
' (
' id ' bigint not null auto_increment,
' name ' varchar (255) NULL,
' age ' int NULL,
PRIMARY KEY (' id ')
);
INSERT into info (name,age) VALUES (' Mick ', ' a ');
INSERT into info (name,age) VALUES (' Mick1 ', ' a ');
INSERT into info (name,age) VALUES (' Mickjoust1 ', ' + ');
INSERT into info (name,age) VALUES (' Joust ', ' 22 ');
Start
View Homepage: http://localhost:8080View database data: Http://localhost:8080/show Summary
This chapter has more space to configure, omit some of th
Spring boot rest example
Introduction: This article will help you use Spring Boot to create simple REST services.
You will learn
What is a REST service?
How to Use Spring Initializr to guide the creation of Rest service appli
Spring boot aop record method execution time code example, springaop
This article focuses on the implementation code of spring boot aop recording method execution time, as follows.
In order to optimize the performance, we need to calculate the execution time of each method f
Example of integrated development of Spring Boot with Spark and Cassandra systems, sparkcassandra
This article demonstrates how to use Spark as the analysis engine and Cassandra as the data storage, and use Spring Boot to develop the driver.
1. Prerequisites
Install Spark
Spring boot thymeleaf Template engine simplest output exampleThe controller code is as follows:@GetMapping (value = "/test")Public String test (model model) { List Boy.add (New Boy ("XX", 11)); Boy.add (New boy ("yy", 22)); Boy.add (New Boy ("ZZ", 33)); Model.addattribute ("Boy", boy); return "hellohtml";}The template code is as follows:
configuration to [email protected] started 6 plugins.
Copy CodeOpen the browser and access: http://localhost:15672/, and use the default user guest login, the password is also guest. We can see the administration page as follows:, we can see some of the basic concepts mentioned in the previous chapters, such as Connections, Channels, exchanges, queue, and so on. The first use of the reader, can be opened to see what the content, familiar with the RABBITMQ Server service side.Click the
directly in Main, then the following plugin must be added, otherwise it will not start. This configuration is not required if you are using Maven's spring-boot:run. (When I'm testing, I run it directly in main if I don't configure the following plugin.) )
the coding of 1.6Hello
The fourth step, the real program begins, we need a startup class, and then in the start class declaration let springboot automatically give us the configuration that
.
Using the public number editor has a very headache problem-the pasted code, the format is garbled, and particularly ugly. This editor can solve this problem.
3. Introductory case(1) integrating Maven in Eclipse development tools (readers can also contact the author for a tutorial on using the MAVEN framework) (2) Create a new Mavan Web project in eclipse named Hellotest(3) Add the following configuration to the Pom.xml file: to build a spring
;The main contents of this section:1: Error resolution. Browser access path tip 404 error page2: Jump to the pre-logon page after logging inOne: Browser access path hint 404 error pageIn the Spring boot framework Learning 6-spring Boot Web Development (2), we have set the pr
-service is suitable, single jar package deployment and management are very convenient. As long as the system architecture design is reasonable, large-scale projects can be used, coupled with nginx load balancing, easy to achieve horizontal expansion;spring bootTo solve the problem, thin provisioning is on the one hand, and on the other hand how to easily spring integrate the ecosystem and other toolchain (
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.